﻿<UserControl x:Class="Qplus.UI.RecordControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="100" d:DesignWidth="480"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:my="clr-namespace:Qplus"
    xmlns:UI="clr-namespace:Qplus.UI">
    
    <Grid x:Name="LayoutRoot">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="89"/>
            <ColumnDefinition Width="302"/>
            <ColumnDefinition Width="89"/>
        </Grid.ColumnDefinitions>
        
        <my:ButtonEx x:Name="otherHead" Width="89" Height="87" InvisibleMargin="0" BorderThickness="0" VerticalAlignment="Top" Grid.Column="0" Visibility="Collapsed">
            <my:ButtonEx.Background>
                <ImageBrush ImageSource="/Qplus;component/Pic/default_portrait.png" Stretch="None" />
            </my:ButtonEx.Background>
            <my:ButtonEx.PressedBackground>
                <ImageBrush ImageSource="/Qplus;component/Pic/default_portrait.png" Stretch="None" />
            </my:ButtonEx.PressedBackground>
        </my:ButtonEx>
        
        <Grid Name="receiveGrid" Grid.Column="1" HorizontalAlignment="Left" Visibility="Collapsed">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="15"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid Name="receiveShadow" Grid.Column="1">
                <Rectangle Stroke="Black" Margin="5" RadiusX="5" RadiusY="5" Opacity="0.9"/>
                <Rectangle Stroke="Black" Margin="4" RadiusX="6" RadiusY="6" Opacity="0.8"/>
                <Rectangle Stroke="Black" Margin="3" RadiusX="7" RadiusY="7" Opacity="0.6"/>
                <Rectangle Stroke="Black" Margin="2" RadiusX="8" RadiusY="8" Opacity="0.4"/>
                <Rectangle Stroke="Black" Margin="1" RadiusX="9" RadiusY="9" Opacity="0.2"/>
                <Rectangle Stroke="Black" Margin="0" RadiusX="10" RadiusY="10" Opacity="0.01"/>
            </Grid>
            <Image Name="receiveImg" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Top"
               Visibility="Visible"
               Source="/Qplus;component/Pic/chat_other_bg_voice_normal.9.png" Stretch="None"/>
            <Rectangle x:Name="receiveRec" Grid.Column="1" Margin="0,0,5,5"
                       Visibility="Visible" Fill="#FF5DBCF8"  RadiusX="5" RadiusY="5"/>
            <Image Name="receivepressImg" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Top"
               Visibility="Collapsed"
               Source="/Qplus;component/Pic/chat_other_bg_voice_down.9.png" Stretch="None"/>
            <Rectangle x:Name="receiveRecPress" Grid.Column="1" Margin="0,0,5,5"
                       Visibility="Collapsed" Fill="#FF2E5E7C" RadiusX="5" RadiusY="5"/>
            <TextBlock Name="recTxt" Grid.Column="1" Foreground="Black" Margin="5,5,10,10" TextWrapping="Wrap"/>
            <UI:RichTextControl x:Name="recRTC" Grid.Column="1" Visibility="Collapsed"/>
            <Grid Name="receiveVoice" Grid.Column="1" HorizontalAlignment="Left" Visibility="Collapsed" Margin="5" MinWidth="80" MaxWidth="302">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="30"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Image Name="left_voice_playing" Grid.Column="0" Source="/Qplus;component/Pic/left_voice_playing.png" Stretch="None"/>
                <Image Name="left_voice_playing_f1" Grid.Column="0" Source="/Qplus;component/Pic/left_voice_playing_f1.png" Stretch="None"/>
                <Image Name="left_voice_playing_f2" Grid.Column="0" Source="/Qplus;component/Pic/left_voice_playing_f2.png" Stretch="None"/>
                <Image Name="left_voice_playing_f3" Grid.Column="0" Source="/Qplus;component/Pic/left_voice_playing_f3.png" Stretch="None"/>
                <TextBlock Name="receiveVoiceLengthTxt" Text="voiceLength" Foreground="#FFE0E0E0"
                           HorizontalAlignment="Right" VerticalAlignment="Center" Grid.Column="1"/>
            </Grid>
        </Grid>
        
        <Grid Name="sendGrid" Grid.Column="1" HorizontalAlignment="Right" Visibility="Collapsed">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="17"/>
            </Grid.ColumnDefinitions>
            <Grid Name="sendShadow" Grid.ColumnSpan="2" Margin="5,5,11,0">
                <Rectangle Stroke="Black" Margin="5" RadiusX="5" RadiusY="5" Opacity="0.9"/>
                <Rectangle Stroke="Black" Margin="4" RadiusX="6" RadiusY="6" Opacity="0.8"/>
                <Rectangle Stroke="Black" Margin="3" RadiusX="7" RadiusY="7" Opacity="0.6"/>
                <Rectangle Stroke="Black" Margin="2" RadiusX="8" RadiusY="8" Opacity="0.4"/>
                <Rectangle Stroke="Black" Margin="1" RadiusX="9" RadiusY="9" Opacity="0.2"/>
                <Rectangle Stroke="Black" Margin="0" RadiusX="10" RadiusY="10" Opacity="0.01"/>
            </Grid>
            <Image Name="sendImg" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top"
               Visibility="Visible"
               Source="/Qplus;component/Pic/chat_my_bg_voice_normal.91.png" Stretch="None"/>
            <Rectangle x:Name="sendRec" Fill="White"  RadiusX="5" RadiusY="5" Margin="0,0,0,6"
                       Visibility="Visible" />
            <Image Name="sendpressImg" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top"
               Visibility="Collapsed"
               Source="/Qplus;component/Pic/chat_my_bg_down.91.png" Stretch="None"/>
            <Rectangle x:Name="sendRecPress" Fill="Gray"  RadiusX="5" RadiusY="5" Margin="0,0,0,6"
                       Visibility="Collapsed"/>
            <TextBlock Name="senTxt" Foreground="Black" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,5,10" TextWrapping="Wrap"/>
            <UI:RichTextControl x:Name="senRTC" HorizontalAlignment="Right" Visibility="Collapsed"/>
            <Grid Name="sendVoice" Margin="5" Grid.Column="0" HorizontalAlignment="Right" Visibility="Collapsed" MinWidth="80" MaxWidth="302">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="30"/>
                </Grid.ColumnDefinitions>
                <TextBlock Name="sendVoiceLengthTxt" Text="voiceLength" Foreground="#FFE0E0E0"
                           HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0"/>
                <Image Name="right_voice_playing" Grid.Column="1" Source="/Qplus;component/Pic/right_voice_playing.png" Stretch="None"/>
                <Image Name="right_voice_playing_f1" Grid.Column="1" Source="/Qplus;component/Pic/right_voice_playing_f1.png" Stretch="None"/>
                <Image Name="right_voice_playing_f2" Grid.Column="1" Source="/Qplus;component/Pic/right_voice_playing_f2.png" Stretch="None"/>
                <Image Name="right_voice_playing_f3" Grid.Column="1" Source="/Qplus;component/Pic/right_voice_playing_f3.png" Stretch="None"/>
            </Grid>
        </Grid>

        <Image Name="picImg" Grid.Column="1" Visibility="Collapsed"/>

        <my:ButtonEx x:Name="recCtrlBtn" Grid.Column="1"
                     Background="Transparent" PressedBackground="Transparent" BorderThickness="0" LostMouseCapture="CtrlBtn_LostMouseCapture" />

        <Grid Name="notUse" Visibility="Collapsed">
            <RichTextBox Background="Gray" x:Name="richTextBox" Grid.Column="1">
            <Paragraph>
                <Run Text="A simple RichTextBox with Image: "/>
                <Italic Foreground="YellowGreen">Some Italic Text Here!</Italic>
            </Paragraph>
        </RichTextBox>
            <Button Grid.Column="1" Margin="0,0,0,100" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="Button_Click">test</Button>
        </Grid>
        <my:ButtonEx x:Name="myHead" Width="89" Height="87" InvisibleMargin="0" BorderThickness="0" VerticalAlignment="Top" Grid.Column="2" Visibility="Collapsed">
            <my:ButtonEx.Background>
                <ImageBrush ImageSource="/Qplus;component/Pic/default_portrait.png" Stretch="Uniform" />
            </my:ButtonEx.Background>
            <my:ButtonEx.PressedBackground>
                <ImageBrush ImageSource="/Qplus;component/Pic/default_portrait.png" Stretch="Uniform" />
            </my:ButtonEx.PressedBackground>
        </my:ButtonEx>
        
        <Grid Name="notuse" Grid.Column="1">
        </Grid>
    </Grid>
</UserControl>
